//
//  NSData+YCTools.h
//  YCCategory
//
//  Created by Apple on 2022/11/1.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSData (YCTools)

/// 字符串base64后转data
/// @param string 传入字符串
+ (NSData *)dataWithBase64EncodedString:(NSString *)string;

/// NSData转string
/// @param wrapWidth 换行长度  76  64
- (NSString *)base64EncodedStringWithWrapWidth:(NSUInteger)wrapWidth;

/// NSData转string 换行长度默认64
- (NSString *)base64EncodedString;

- (id)dataToJson;

- (NSString *)dataToString;

@end

NS_ASSUME_NONNULL_END
